home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / THD_12_3.ZIP / TESTINFO.INC < prev    next >
Text File  |  1996-03-20  |  14KB  |  313 lines

  1.  
  2. {
  3.                      This file format may be used freely by
  4.                    any utility which might have a use for it.
  5.  
  6.               If you program a file processor, you might consider
  7.               utilizing the format to simplify the programming of
  8.               external interface  utilities. (Wouldn't it be nice
  9.               if third party  utils could be used to  interface a
  10.               number of  upload testers, thus  allowing the users
  11.               of different BBS  packages an opportunity to switch
  12.               from one tester to another  without having to worry
  13.               about interfacing problems?)
  14.  
  15. ****************************************************************************
  16. **                                                                        **
  17. **    TESTINFO_REC record types as created by THD ProScan Version 10.0    **
  18. **    (or later)                                                          **
  19. **      TESTINFO.DAT is a "file of TESTINFO_REC" which is created by      **
  20. **  THD ProScan when the user has configured a BBSTYPE other than "NONE"  **
  21. **  in THDINSTL.                                                          **
  22. **                                                                        **
  23. ****************************************************************************
  24. }
  25.  
  26. TYPE
  27.  
  28. TESTINFO_FILE_REC = record {individual file information record}
  29.  
  30.    FILE_SFX,
  31.    FILE_EXISTS  : boolean;
  32.    FILE_FULL,
  33.    FILE_PATH    : string[60];
  34.    FILE_DRIVE   : string[2];
  35.    FILE_NAME    : string[8];
  36.    FILE_EXT,
  37.    FILE_TYPE    : string[3];
  38.    FILE_DT,
  39.    FILE_SIZE    : longint;
  40.    end;
  41.  
  42.  
  43.  
  44. TESTINFO_REC = Record {format of TESTINFO.DAT individual records}
  45.  
  46.    Processed,
  47.    VND_present,
  48.    DESC_imp_req,
  49.    ADD_rec,
  50.    F_conv,
  51.    Ansi_detected,
  52.    Avatar_detected,
  53.    CD_detected,
  54.    BBS_Processed,
  55.    RES_bool_one,
  56.    RES_bool_two,
  57.    RES_bool_thr,
  58.    RES_bool_fou,
  59.    RES_bool_fiv,
  60.    RES_bool_six,
  61.    RES_bool_sev,
  62.    RES_bool_eig      : boolean;
  63.    Check_count,
  64.    BBS_type,
  65.    COM_port,
  66.    EXIT_level,
  67.    TESTINFO_REV,
  68.    RES_byte_one,
  69.    RES_byte_two,
  70.    RES_byte_thr,
  71.    RES_byte_fou,
  72.    RES_byte_fiv,
  73.    RES_byte_six,
  74.    RES_byte_sev,
  75.    RES_byte_eig,
  76.    RES_byte_nin      : byte;
  77.    TEST_DT,
  78.    RES_li_one,
  79.    RES_li_two,
  80.    RES_li_thr,
  81.    RES_li_fou,
  82.    RES_li_fiv,
  83.    RES_li_six,
  84.    RES_li_sev,
  85.    RES_li_eig,
  86.    RES_li_nin,
  87.    RES_li_ten        :longint;
  88.    CMD_options,
  89.    BBS_data_dir,
  90.    Creator,
  91.    Log_path,
  92.    RES_str60_one,
  93.    RES_str60_two,
  94.    RES_str60_thr     : string[60];
  95.    Ver_major,
  96.    Ver_minor         : string[2];
  97.    VAR_ext           : string[3];
  98.    Desc_filename,
  99.    RES_str12_one,
  100.    RES_str12_two,
  101.    RES_str12_thr     : string[12];
  102.    ORIGINAL_F_info,
  103.    FINISHED_F_info   : TESTINFO_FILE_REC;
  104.    RES_int_one,
  105.    RES_int_two,
  106.    RES_int_thr,
  107.    RES_int_fou,
  108.    RES_int_fiv,
  109.    Descr_Length      : integer;
  110.    DIZ_Description   : array[1..1500] of char
  111.    end;
  112.  
  113. {
  114.                      *********************************
  115.                      **  EACH RECORD IS 2380 BYTES  **
  116.                      *********************************
  117.  
  118.     This format is Copyright 1994 - 1995 PainSoft and is freely usable but may 
  119. not be modified. Persons wishing to add or change fields should contact David 
  120. Muir at 1:259/423.0 (fidonet) to discuss suggestions for changes.
  121.  
  122.      This file is an "include" file for use with Turbo Pascal. It defines the 
  123. 2 "types" used to create the file "TESTINFO.DAT" which is a data file which 
  124. can be used by external programs to update the various file databases of BBS 
  125. types supported to date.
  126.      It includes a great bit of information that could be useful to utility 
  127. programmers wishing to program an interface for an upload processor and any 
  128. number of BBS programs. Much of the information included here could be easily 
  129. determined by programmers. It is included here to simply your efforts (as well 
  130. as my own).
  131.      TESTINFO.DAT has it's own numbering of BBS TYPES and reserves values of 
  132. 1-254 for standard definitions. A BBSTYPE of "0" indicates no BBS is involved 
  133. and will not cause this file to be written and should therefore never be 
  134. encountered.
  135. Currently defined BBS types are as follows
  136.  
  137. 0   - No BBS (create no file)
  138. 1   - RemoteAccess 2.00 (and compatibles)
  139. 2   - Telegard 2.7
  140. 3   - Renegade 07-17 (or compatible)
  141. 4   - FILES.BBS (standard)
  142. 5   - FILES.BBS (SBBS extended format)
  143. 6   - Telegard 3.0
  144. 7   - RemoteAccess 2.5?
  145. 8   - FILES.BBS (" +" extended format)
  146. 9   - PCBoard 15.?
  147. 10  - T.A.G. (version 2.7)
  148. 11  - Wildcat 4.xx (NOT supported by THDPLUS)
  149. 12  - FILES.BBS (" |" extended format)
  150. 13 - 254 reserved for later definition.
  151. 255 - unsupported types. (all types not noted above)
  152.  
  153.      Any creator of this record should increase the "Check_Count" for each  
  154. record once for each time the TESTINFO.DAT file is accessed. It is recommended 
  155. to delete any record which has a Check_Count of 51 or higher or which is 
  156. marked as having been processed.
  157.  
  158. Date/Time variables as used in these records are in Packed Time Format.
  159. Turbo Pascal users can simply use "unpacktime".
  160.  
  161. The Packed Time Format (PTF) is a 32 bit Longint decoded as follows:
  162.  
  163. - for "C" programmers...
  164.   shr = shift right
  165.   and = bitwise and
  166.   $7F = 7Fh
  167. to the best of my understanding.
  168.  
  169. var
  170.   Yr    : 0..127;     Years since 1980
  171.   Month : 1..12;      Month number
  172.   Day   : 1..31;      Day of month
  173.   Hour  : 0..23;      Hour of day
  174.   Min   : 0..59;      Minute of hour
  175.   Sc    : 0..29;      Seconds divided by 2
  176.   Year  : Word;
  177.   Sec   : Word;
  178. begin
  179.   Yr    := (PTF shr 25) and $7F ;
  180.   Month := (PTF shr 21) and $0F ;
  181.   Day   := (PTF shr 16) and $1F ;
  182.   Hour  := (PTF shr 11) and $1F ;
  183.   Min   := (PTF shr  5) and $3F ;
  184.   Sc    := (PTF and $1F) ;
  185.   Year  := 1980 + Yr ;
  186.   Sec   := 2 * Sc ;
  187. end;
  188.  
  189.      It is also my understanding that "C" programmers could read this longint 
  190. as two "words" (the first word being time and the second word being date).
  191.  
  192.      Outline for TESTINFO_FILE_REC as a type used below
  193.  
  194. FILE_SFX    - Is this a self extracting archive?
  195. FILE_EXISTS - did this file exist at the time this record was written
  196. FILE_FULL   - fully qualified file path - drive:\path\name.extension
  197.               "drive:" will always be included even if the user did not
  198.               supply a drive letter in the path to the test file. When this
  199.               occurs, THDPRO.EXE inserts the drive specification of the
  200.               current drive in this path. That drive specification may
  201.               differ from the time THD runs and the time an external utility
  202.               runs. Be sure to check the FILE_DRIVE variable to see that
  203.               this drive was supplied and not assumed (network drive specs
  204.               can change depending on the remote system).
  205.               [if length(FILE_DRIVE)=2 then the drive letter was supplied.]
  206. FILE_DRIVE  - Drive Letter of file path (colon is included if a drive letter
  207.               is defined. In cases where a drive letter is not specifically
  208.               supplied, this entry will be empty)
  209. FILE_PATH   - file path (in the format "\WHAT\DIR\" with both beginning and
  210.               trailing backslashes)
  211. FILE_NAME   - file name (name only no "." or extension)
  212. FILE_EXT    - file extension [note that the "." is not included in this
  213.               record]
  214. FILE_TYPE   - file "type" will be one of...
  215.               ARC / ARJ / GIF / HYP / LZH / PAK / RAR /SQZ / TD0 /UC2 / ZIP
  216.               or NON [for un-supported types] (Types reported here may be
  217.               expanded on by third party programmers, but should try to use
  218.               accepted conventions for file types, usually the file
  219.               extension would be suggested.)
  220. FILE_DT     - file date/time - (Turbo Pascal users use "unpacktime")
  221. FILE_SIZE   - file size in bytes
  222.  
  223.  
  224.      The outline for the TESTINFO.DAT record for the purpose of allowing 
  225. external manipulation of file data bases or other data which may be of use to 
  226. BBS manipulation.
  227.  
  228.    Labels beginning with "RES_" (as in "reserved") are currently not used (or 
  229. explained here) but are present to help ensure the future compatibility of 
  230. this file format.
  231.  
  232. Outline for TESTINFO_REC - (as used to create TESTINFO.DAT)
  233.  
  234. Processed        - Has this record been processed? [if true the utility which
  235.                    created this record should remove this record on it's next
  236.                    run]. Use this to indicate when the file has been
  237.                    completely processed and will no longer be required. Proper
  238.                    use of this field will help to keep the TESTINFO.DAT file
  239.                    compressed to a reasonable size.
  240. VND_present      - is VENDINFO.DIZ present in file?
  241. DESC_imp_req     - is Description importation requested? If set to false,
  242.                    the user has requested that descriptions not be imported
  243.                    into their file database.
  244. ADD_rec          - does the user wish to Create a new entry in their
  245.                    file database if one is not currently present?
  246. F_conv           - was file successfully converted [true even if file type
  247.                    was not changed during conversion]
  248. Ansi_detected    - was ANSI detected on the remote system.
  249. Avatar_detected  - was Avatar 0+ detected on remote system.
  250. CD_detected      - was carrier detected at last check on remote system?
  251. BBS_Processed    - Used by the BBS to determine if the BBS has processed
  252.                    this record.
  253. Check_count      - Number of times this record has been found but not
  254.                    processed [ Recommended to purge any record checked
  255.                    more than 50 times. as well increment this number by
  256.                    one each time a new record is added. ]
  257. BBS_type         - BBSTYPE as defined above.
  258. COM_port         - Comport used during test [0 if local].
  259. EXIT_level       - Dos Error level expected to be returned by the creator
  260.                    of the record.
  261. TESTINFO_REV     - The revision number of the TESTINFO file. Currently
  262.                    there is only revision "1" (This revision).
  263. TEST_DT          - date/time [ at time of writing this record ]
  264. CMD_options      - Command line options supplied to the creator [The first
  265.                    and last character must always be " " [space]].
  266. Log_path         - This is the full path and filename used as the creator's
  267.                    temporary log file (if any).
  268. Creator          - The name of the Program that created this record.
  269.                    Under all normal circumstances this will be
  270.                    "THD ProScan". Although if other programmers choose to
  271.                    create a record of this type, they should insert their
  272.                    own identification in this area. This is the ONLY place
  273.                    where a string variable will contain lower case.
  274. BBS_data_dir     - Path to BBS data directory [usually main BBS directory]
  275. Ver_major        - Creator's version number (major) [ie. "10"]
  276. Ver_minor        - Creator's version number (minor) [ie. "m" or ".0"]
  277. VAR_ext          - Variable extension number used for this test. (the three
  278.                    number extension used on temp directories and files
  279.                    during this test)
  280. Desc_filename    - Name of the file from which the description included
  281.                    was extracted. [blank if none] This is included if for
  282.                    some reason the third party programmer wishes to
  283.                    re-extract the file from which the description was taken.
  284.                    This file name will always be contained in the main
  285.                    archive, and thus could be extracted from the resulting
  286.                    archive if need be. This may be help for instance where a
  287.                    description is the full 1500 characters and not taken
  288.                    from a VENDINFO.DIZ. The programmer could re-extract the
  289.                    description file and use it in it's entirety (if they
  290.                    wished).
  291. ORIGINAL_F_info  - Original file information [as stored in the type
  292.                    TESTINFO_FILE_REC]. Information on the file prior to
  293.                    the creator making any modifications.
  294. FINISHED_F_info  - Finished file information [as stored in the type
  295.                    TESTINFO_FILE_REC]. Information on the resulting file after
  296.                    the creator has completed it's processing of this file.
  297.                    Changes from the original file "can" occur in any of the
  298.                    fields through archive conversion or other manipulation.
  299. Descr_Length     - Number of characters in the DIZ_Description field
  300.                    [ 0 if no description, maximum 1500 ]
  301. DIZ_Description  - Description containing the full description including
  302.                    any CR/LF (or other control or non ASCII characters) that
  303.                    may have been present in the description file used
  304.                    [maximum 1500 characters]
  305.  
  306.      ** NOTE **
  307.      All string variables and character variables will be stored as uppercase 
  308. in these records except for the "CREATOR" field which contains the name of the 
  309. creator of the record. There will be absolutely no lowercase information in 
  310. these records anywhere else except in the diz_description field.
  311.      Strings and arrays are NOT necessarily null terminated.
  312. }
  313.